package be.technofutur.web;

import java.io.PrintWriter;

public class HtmlInit 
{
	public static void headerInit (PrintWriter out , String title)
	{
		out.println("<!DOCTYPE html><html><head><title>"+title+"</title></head><body>");
	}
	
	public static void endInit (PrintWriter out)
	{
		out.println("</body></html>");
	}
	
	public static void tableInit (PrintWriter out)
	{
		out.println("<TABLE>");
	}
	
	public static void tableEnd (PrintWriter out)
	{
		out.println("</TABLE>");
	}
	
	public static void formInit (PrintWriter out , String path )
	{
		out.print ("<form method=\"POST\" action=\""+path+"\">");
		
	}
	
	public static void formEnd (PrintWriter out)
	{
		out.println("</form>");
	}
	
	public static void tableCellCheckBox (PrintWriter out , String nameAllCheckBox , String valueName , String realValue)
	{
		out.print("<TD><input type=\"checkbox\" name=\""+nameAllCheckBox+"\" value=\""+valueName+"\"/>"+realValue+"</TD>");
	}
	
	public static void tableLineInit (PrintWriter out )
	{
		out.print("<TR>");
	}
	
	public static void tableLineEnd (PrintWriter out )
	{
		out.print("</TR>");
	}
	
	public static void input (PrintWriter out , String type , String value)
	{
		out.println("<INPUT type=\""+type+"\" value=\""+value+"\"/>");
	}
	
	public static void nextLine ( PrintWriter out)
	{
		out.print("<br>");
	}
}
